<!--
- @founder   IT柏拉图, https: //weibo.com/itprato
- @author    DedeCMS团队
- @copyright Copyright (c) 2007 - 2021, 上海卓卓网络科技有限公司 (DesDev, Inc.)
--->

<html>
<head>
<meta charset="{dede:global.cfg_soft_lang/}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>数据库管理</title>
<meta name="copyright" content="2007-2021 DedeCMS, 上海卓卓网络科技有限公司 (DesDev, Inc.)" />
<link rel="icon" href="/favicon.ico" />
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/pkg/uikit/css/uikit.min.css" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/css/manage.dede.css">
</head>
<body>
<!-- 列表头部 -->
<div id="Table_Header_202X2W2X1X292F" class="uk-card uk-card-small uk-card-default" uk-sticky="bottom: #offset">
<div id="Header_1W2T2S2T1V252B" class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small">
<span><ul class="uk-breadcrumb"><li><span>数据库管理</span></li></ul></span>
</div>
<!-- 搜索表单 -->
<ul class="uk-navbar-nav dede-card-navbar" uk-navbar >
<li style="margin-right: 12px;"><a href="sys_group_add.php" class="uk-button uk-button-default uk-button-small uk-flex-inline ">整库备份</a></li>
<li style="margin-right: 12px;"><a href="sys_sql_query.php?dopost=opimizeAll&token=<?php echo $_SESSION['token']; ?>" class="uk-button uk-button-default uk-button-small uk-flex-inline ">整库优化</a></li>
<li style="margin-right: 12px;"><a href="sys_sql_query.php?dopost=repairAll&token=<?php echo $_SESSION['token']; ?>" class="uk-button uk-button-default uk-button-small uk-flex-inline ">整库修复</a></li>
</ul>
<!-- /搜索表单 -->
</div>
<!-- 表头显示部分 -->
<table id="dede-table-toolbar" class="uk-table uk-table-middle uk-table-divider uk-table-striped uk-margin-remove">
<thead>
<tr>
<td width="5%"></td>
<td>表名</td>
<td width="8%">记录数</td>
<td width="8%">数据大小</td>
<td width="12%">创建日期</td>
<td width="12%">更新日期</td>
<td width="10%">操作</td>
</tr>
</thead>
</table>
<!-- /表头显示部分 -->
</div>
<!-- /列表头部 -->
<!-- 列表主体 -->
<div id="Table_Body_1X2V2U2V1W272D" class="uk-card uk-card-small uk-card-default" style="top: -51;">
<div class="uk-card-body uk-overflow-auto" grid>
<div class="uk-child-width-1-1">
<div class="uk-overflow-auto">
<!-- 表头隐藏部分，用于固定表结构宽度 -->
<table class="uk-table uk-table-hover uk-table-middle uk-table-divider uk-table-striped uk-margin-remove">
<thead>
<tr>
<td width="5%"></td>
<td>表名</td>
<td width="8%">记录数</td>
<td width="8%">数据大小</td>
<td width="12%">创建日期</td>
<td width="12%">更新日期</td>
<td width="10%">操作</td>
</tr>
</thead>
<!-- /表头隐藏部分 -->
<tbody>
<!-- 内容列表 -->
{dede:array.dedeSysTables}
<tr>
<td><input type="checkbox" value="{dede:field.Name/}" name="tables" class="uk-checkbox check" /></td>
<td>{dede:value.Name /}</td>
<td>{dede:value.Rows /}</td>
<td>{dede:value.Data_length /}</td>
<td>{dede:value.Create_time /}</td>
<td>{dede:value.Update_time /}</td>
<td>
<a href="sys_sql_query.php?dopost=opimize&tablename={dede:value.Name /}&token=<?php echo $_SESSION['token']; ?>" >[优化]</a>
<a href="sys_sql_query.php?dopost=repair&tablename={dede:value.Name /}&token=<?php echo $_SESSION['token']; ?>">[修复]</a>
</td>
</tr>
{/dede:array}
<!-- /内容列表 -->
</tbody>
<!-- 批量操作 -->
<thead>
<tr>
<td><input type="checkbox" id="select-all" class="uk-checkbox" /></td>
<td height="36" colspan="8">
<a href="#" class="uk-button uk-button-default uk-button-small">表修复</a>
<a href="#" class="uk-button uk-button-default uk-button-small">表优化</a>
<a href="#" class="uk-button uk-button-default uk-button-small">数据备份</a>
</td>
</tr>
</thead>
<!-- /批量操作 -->
</table>
</div>
</div>
</div>
</div>
<!-- /列表主体 -->
<!-- 列表底部 -->
<div class="bar-bottom uk-flex uk-light uk-flex-right">
<div class="uk-button-group" style="margin-left: 50px;">
</div>
<div class="e1e02">Copyright &copy; 2007-2021 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>, 上海卓卓网络科技有限公司 (DesDev, Inc.)</div>
</div>
<!-- 列表底部 -->
<!-- JS FILES -->
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit-icons.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/jquery/jquery.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/js/dede.manage.min.js"></script>
<!-- / JS FILES -->
<script language="javascript">
var myajax;
var newobj;
var posLeft = 200;
var posTop = 150;
function LoadUrl(surl) {
newobj = document.getElementById('_mydatainfo');
if (!newobj) {
newobj = document.createElement("DIV");
newobj.id = '_mydatainfo';
newobj.style.position = 'absolute';
newobj.className = "dlg";
newobj.style.top = posTop;
newobj.style.left = posLeft;
document.body.appendChild(newobj);
} else {
newobj.style.display = "block";
}
myajax = new DedeAjax(newobj);
myajax.SendGet("sys_data.php?" + surl);
}
function HideObj(objname) {
var obj = document.getElementById(objname);
obj.style.display = "none";
}
//获得选中文件的数据表
function getCheckboxItem() {
var myform = document.form1;
var allSel = "";
if (myform.tables.value) return myform.tables.value;
for (i = 0; i < myform.tables.length; i++) {
if (myform.tables[i].checked) {
if (allSel == "")
allSel = myform.tables[i].value;
else
allSel = allSel + "," + myform.tables[i].value;
}
}
return allSel;
}
//反选
function ReSel() {
var myform = document.form1;
for (i = 0; i < myform.tables.length; i++) {
if (myform.tables[i].checked) myform.tables[i].checked = false;
else myform.tables[i].checked = true;
}
}
//全选
function SelAll() {
var myform = document.form1;
for (i = 0; i < myform.tables.length; i++) {
myform.tables[i].checked = true;
}
}
//取消
function NoneSel() {
var myform = document.form1;
for (i = 0; i < myform.tables.length; i++) {
myform.tables[i].checked = false;
}
}
function checkSubmit() {
var myform = document.form1;
myform.tablearr.value = getCheckboxItem();
return true;
}
</script>
</body>
</html>
